import { get, post, put, del } from '@/js/api/dataSource'
export default {
	routing: {
		findProductionLineListAll () {
			return get({ url: '/archive/productionLine/findProductionLineListAll' })
		},
		// 删除
		delete (id) {
			return del({ url: `/technology/routing/delete/${id}` })
		},
		// 校验删除接口
		checkDelete (id) {
			return del({ url: `/technology/routing/checkDelete/${id}`, autoSuccessMsg: true })
		},
		// 保存 新增修改
		saveOrUpdate () {
			return post({ url: '/technology/routing/saveOrUpdate', autoSuccessMsg: true })
		},
		// 保存 新增修改
		updateOther () {
			return post({ url: '/technology/routing/updateOther', responseComplete: true, autoSuccessMsg: true })
		},
		findStationAllByRoutingId () {
			return get({ url: '/technology/routing/findStationAllByRoutingId' })
		},
		findUnitListByParam () {
			return get({ url: '/technology/routing/findUnitListByParam' })
		},
		// 批量删除
		batchDelete () {
			return del({ url: '/technology/line/batchDelete', responseComplete: true })
		},
		// 复制工艺路线（只复制工序信息不含sop和消耗产出品信息,此复制只有覆盖）
		copyList () {
			return get({ url: '/technology/line/copyList' })
		},
		copyLine () {
			return post({ url: '/technology/line/copyLine', autoSuccessMsg: true })
		},
		// 导出工艺路线
		exportPdfLine () {
			return get({ url: '/technology/line/exportPdfLine' })
		},
		// 通过参数查询工序路由信息接口
		findDetailByParam () {
			return get({ url: '/technology/line/findDetailByParam' })
		},
		// 获取当前编号的下一个
		getNextCode () {
			return get({ url: '/technology/line/getNextCode' })
		},
		// 分页查询接口
		pageQuery () {
			return post({ url: '/technology/line/pageQuery', responseComplete: true })
		},
		// 新增或者更新工艺路线接口
		lineSaveOrUpdate () {
			return post({ url: '/technology/line/saveOrUpdate', responseComplete: true, autoSuccessMsg: true })
		},
		// 批量更新启用停用接口
		updateEnable () {
			return put({ url: '/technology/line/updateEnable', responseComplete: true })
		},
		// 删除路线物料列表批量
		routingMaterialDelete () {
			return del({ url: '/technology/routingMaterial/delete', autoSuccessMsg: true })
		},
		// 通过参数查询路线物料列表接口 参数1：routingId 路由id 参数2：可选 dataType 1：查询消耗品2查询产出品列表 不穿查全部
		findListByParam () {
			return get({ url: '/technology/routingMaterial/findListByParam' })
		},
		// 新增或者更新工艺路线物料接口
		routingMaterialSaveOrUpdate () {
			return post({ url: '/technology/routingMaterial/saveOrUpdate' })
		},
		// SOP 通过参数查询SOP信息
		sopFindListByParam () {
			return get({ url: '/technology/routing/sop/findListByParam' })
		},
		// sop图片信息
		sopImgFindListByParam () {
			return get({ url: '/technology/routing/sopImage/findListByParam' })
		},
		// 通过路由ID获取附件列表
		findProcedureFile () {
			return get({ url: '/technology/file/findListByParam' })
		},
		// 行编辑物料下拉
		findProLineListByEnable () {
			return get({ url: '/technology/material/findProLineListByEnable' })
		}
	}
}
